package allinpay.yun.demo.dto.dic;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author: lijin
 * @date: 2018年11月29日
 */
public enum VerificationCodeType {

    bind_phone(9, "绑定手机");

    public Integer value;
    public String description;

    VerificationCodeType(Integer value, String description) {
        this.value = value;
        this.description = description;


    }

    @JsonCreator
    public static VerificationCodeType valueOf(Integer value) {
        VerificationCodeType[] values = VerificationCodeType.values();
        for (VerificationCodeType item : values) if (item.value == value.intValue()) return item;
        return null;
    }

    @JsonValue
    public Integer getValue() {
        return value;
    }
}
